# - Coding UTF8 -
#
# Networked Decision Making
# Site: http://code.google.com/p/global-decision-making-system/
#
# License Code: GPL, General Public License v. 2.0
# License Content: Creative Commons Attribution 3.0
#
# Also visit: www.web2py.com
#             or Groups: http://groups.google.com/group/web2py 
# 	For details on the web framework used for this development
#
# Developed by Russ King (newglobalstrategy@gmail.com
# Russ also blogs occasionally at proudofyourplanent.blogspot.com
# His general thinking on why this project is very important is availalbe at
# http://www.scribd.com/doc/98216626/New-Global-Strategy
#
# This controller handles submission of questiosn and confirmation that the 
# question has been submitted
# main question table - this is deliberately and consciously not normalised due to aim to deploy
# on google app engine and difficult of doing joins so up to 10 answers are hard coded into
# the question structure - not terribly elegant but there we are. Table has also been overloaded
# to an extent by including actions as a type of question - actions are special in that users
# would only ever be asked to agree or disagree with actions - there are no other possible answers


db.define_table('download',
Field('title',unique=True),
Field('file','upload'),
Field('description','text'),
Field('version','string',default='1'),
format = '%(title)s')

db.download.title.requires = IS_NOT_IN_DB(db, db.download.title)





